package samples.zipcodes;

import java.util.List;

import br.cin.ufpe.in1118.middleware.distribution.services.GenericStub;
import br.cin.ufpe.in1118.middleware.distribution.services.ObjectReference;
import br.cin.ufpe.in1118.middleware.exceptions.RemoteException;

public class ZipCodes_Stub extends GenericStub implements ZipCodes {

	public ZipCodes_Stub(ObjectReference objectReference) {
		super(objectReference);
	}

	@Override
	public Coordinates getCoordinatesFromZipCode(String zipCode) throws RemoteException {
		return (Coordinates) super.execute("ZipCodeToLatitudeLogitude", zipCode);
	}

	@Override
	public ZipCodeDetails getDetailsFromZipCode(String zipCode) throws RemoteException {
		return (ZipCodeDetails) super.execute("ZipCodeToDetails", zipCode);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<String> zipCodesFromCityState(String city, String state) throws RemoteException {
		return (List<String>) super.execute("ZipCodesFromCityState", city, state);
	}

}
